1、平衡二叉树
思想：求出每个节点的左右子树的高度差即可
class Solution {
public:
    int _IsBalanced_Solution(TreeNode* pRoot)
    {
        if(pRoot==nullptr)
            return 0;
        int l=1+_IsBalanced_Solution(pRoot->left);
        int r=1+_IsBalanced_Solution(pRoot->right);
        return max(l,r);
    }
    bool IsBalanced_Solution(TreeNode* pRoot) {
        if(pRoot==nullptr)
            return true;
        int left=_IsBalanced_Solution(pRoot->left);
        int right=_IsBalanced_Solution(pRoot->right);
        int ans=abs(left-right);
        return ans<=1&&IsBalanced_Solution(pRoot->left)&&IsBalanced_Solution(pRoot->right);
    }
};